<script setup>
import { baseagree } from "@/services/user";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { nextTick, ref, watch, onMounted } from "vue";

onLoad((e) => {
  code.value = e.code;
  getList();
});

const code = ref("");
const introData = ref({});

const getList = async () => {
  try {
    // 发送请求
    let res = await baseagree({ code: code.value });
    if (res.code == 200) {
      introData.value = res.data;
    }
  } catch (e) {
    uni.showToast({
      title: e.info,
      icon: "none",
    });
  }
};
</script>

<template>
  <view class="content">
    <text>{{ introData.name }}</text>
    <text class="content-time">{{ introData.create_time }}</text>
    <!-- <div class="content-text" v-html="introData.content"></div> -->
    <view class="content-test">
      <up-parse :content="introData.content"></up-parse>
    </view>
  </view>
</template>

<style lang="scss" scoped>
@import "./userAgreementDeatils.scss";
</style>
